Total Complexity | 2 |
Total Lines | 16 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | import Twit from 'twit'; |
||
11 | |||
12 | 5 | export abstract class AbstractAction { |
|
13 | config: BotConfig; |
||
14 | twit: Twit; |
||
15 | debug: Debug.Debugger; |
||
16 | |||
17 | constructor(config: BotConfig, twit: Twit, debug: Debug.Debugger) { |
||
18 | 3 | this.config = config; |
|
19 | 3 | this.twit = twit; |
|
20 | 3 | this.debug = debug; |
|
21 | } |
||
22 | |||
23 | abstract run(args: runArgs): void; |
||
24 | |||
25 | protected isSuccessResponse(response: Twit.PromiseResponse): boolean { |
||
26 | 8 | return response.resp.statusCode === 200; |
|
27 | } |
||
28 | } |